/**
 * @description {内容} {是否显示蒙层} {持续时长} {提示图标}
 * @param {内容} title
 * @param {是否显示蒙层} mask
 * @param {持续时长} duration
 * @param {提示图标} icon
 * @returns
 */
const toast = ({ title, mask = false, duration = 2000, icon = "none" }) =>
    uni.showToast({
        title: title,
        mask,
        duration,
        icon,
    });

/**
 * @description:  {标题} {内容} {是否展示取消}  {取消按钮文字} {取消按钮颜色} {确定按钮文字} {确定按钮颜色}
 * @param {标题} title
 * @param {内容} content
 * @param {是否展示取消} showCancel
 * @param {取消按钮文字} cancelText
 * @param {取消按钮颜色} cancelColor
 * @param {确定按钮文字} confirmText
 * @param {确定按钮颜色} confirmColor
 * @return {*}
 */
const modal = ({
    title = "温馨提示",
    content,
    showCancel = true,
    cancelText = "取消",
    cancelColor = "#000",
    confirmText = "确定",
    confirmColor = "#007acc",
    successCB = () => {
        
    },
}) =>
    uni.showModal({
        title: title,
        content,
        showCancel,
        cancelText,
        cancelColor,
        confirmText,
        confirmColor,
        success: successCB,
    });


export {
    toast ,
    modal
}